

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>系统日志列表</title>
        <calendar:resources lang="en" theme="tiger"/>
        <g:javascript src="jquery-1.2.4a.js" />
        <style type="text/css">
        .searchbar {
            margin-top:10px;
            background-color:lightgrey;
            border:1px solid darkgrey;
            width:100%;
            height:30px;
            padding:5px;
        }
        .total {
            padding-top:5px;
            float:left;
            color:red;
        }
        .search {
            float :right;
            color:white;
        }
        </style>
        <script type="text/javascript">
          $(function() {
                     //批量删除的全选按钮
                     $("#rsel").click( function() {
                       if( $("#rsel")[0].checked){
                         $("input[type=checkbox]").each(function(i){ this.checked=true  });
                       } else{
                          $("input[type=checkbox]").each(function(i){this.checked = false });
                       }
                     } );

            var options = {
                        target:        '',   // target element(s) to be updated with server response
                        beforeSubmit:  showRequestList,  // pre-submit callback
                        success:       showResponseList  // post-submit callback
                    };

                    // bind to the form's submit event
                    $('#formlist').submit(function() {

                        $(this).ajaxSubmit(options);
                        return false;
                    });

                    // pre-submit callback
                      function showRequestList(formData, jqForm, options) {
                          return true;
                      }

                      // post-submit callback
                      function showResponseList(responseText, statusText)  {
                        location.reload();
                      }
            }
          );
        </script>
    </head>
    <body>
        <div class="body">
            <h1>系统日志列表</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="searchbar">
                <div class="total">
                    系统含有${SystemLog.count()}条系统日志
                </div>
                <div class="search">
                    <g:form action="listSearch">
                        <calendar:datePicker name="searchDate" defaultValue="${new Date()}"/>
                        <input class="save" type="submit" value="搜索" />
                    </g:form>
                </div>
            </div>
            <br>
            <div class="list">
                <g:render template="list" />
            </div>
            <div class="paginateButtons">
                <g:paginate total="${systemLogInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
